<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>Login Page</title>

<!-- BEANS DECLARATION -->
<jsp:useBean id="messageBean" scope="session"
	class="edu.uic.ids517.model.MessageBean">
</jsp:useBean>
<jsp:useBean id="dbaseBean" scope="session"
	class="edu.uic.ids517.model.DatabaseAccessBean"></jsp:useBean>
<jsp:useBean id="dbmsUserBean" scope="session"
	class="edu.uic.ids517.model.DbLoginBean"></jsp:useBean>
</head>

<body background="images/image1.jpg">
	<center>
		<h1>
			<font size="8" color="white">UIC Data Mining Tool</font>
		</h1>
		<br /> <br /> <br />
		<hr>
		<br />
	</center>

	<!-- ACTION FORM -->
	<form action="DbLoginServlet" method="post">
		<table>
			<tr>
				<td> 
					<% 	String errorMessage = (String)request.getAttribute("errorMessage"); %>
					<% if (("Session Timeout!").equals(errorMessage)) { %> 
					<center> 
						<font size="6" color="white"><%=errorMessage%>
						</font>
					</center> 
					
					<!-- close all database connections on timeout! --> 					
					<% dbaseBean.closeConnection() ; %>
					
					<% } %>
				</td>
			</tr>
			<tr>
				<th align="right"><font size="6" color="white">User
						name:</font></th>
				<td><input TYPE="TEXT" name="userName" size="16" value="f14g49"></td>
			</tr>
			<tr>
				<th align="right"><font size="6" color="white">Password:</font></th>
				<td><input TYPE="PASSWORD" name="password" size="14"
					value="f14g49QRcdY"></td>
			</tr>
			<tr>
				<th align="right"><font size="6" color="white">DBMS Host
						Server:</font></th>
				<td><select name=host>
						<option value="131.193.209.54">Server 54</option>
						<option value="131.193.209.57">Server 57</option>
				</select></td>
			</tr>
			<tr>
				<th align="right"><font size="6" color="white">RDBMS:</font></th>
				<td><select name=dbms>
						<option value="MySQL" selected="SELECTED">MySQL</option>
				</select></td>
			</tr>
			<tr>
				<th><font size="6" color="white">Database Schema:</font></th>
				<td><input TYPE="TEXT" name="databaseSchema" size="16"
					value="f14g49"></td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td></td>
				<td><input TYPE="SUBMIT" value="Login"> &nbsp;&nbsp; <input
					TYPE="reset" value="Reset"></td>
			</tr>
		</table>
		<br> <br> <br> <br>
	</form>
</body>


</html>